<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>perlfaq3 - Programming Tools - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/perlfaq3">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq3.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/perlfaq3">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/perlfaq3">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/perlfaq3">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/perlfaq3">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/perlfaq3">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/perlfaq3">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/perlfaq3">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/perlfaq3">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/perlfaq3">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/perlfaq3">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/perlfaq3">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/perlfaq3">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/perlfaq3">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/perlfaq3">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/perlfaq3">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/perlfaq3">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/perlfaq3">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/perlfaq3">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/perlfaq3">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/perlfaq3">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/perlfaq3">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/perlfaq3">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/perlfaq3">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/perlfaq3">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/perlfaq3">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/perlfaq3">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/perlfaq3">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/perlfaq3">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/perlfaq3">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/perlfaq3">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/perlfaq3">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/perlfaq3">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/perlfaq3">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/perlfaq3">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/perlfaq3">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/perlfaq3">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/perlfaq3">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/perlfaq3">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/perlfaq3">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/perlfaq3">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/perlfaq3">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/perlfaq3">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/perlfaq3">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/perlfaq3">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/perlfaq3">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/perlfaq3">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/perlfaq3">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/perlfaq3">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/perlfaq3">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/perlfaq3">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/perlfaq3">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/perlfaq3">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/perlfaq3">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/perlfaq3">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/perlfaq3">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/perlfaq3">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/perlfaq3">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/perlfaq3">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/perlfaq3">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/perlfaq3">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/perlfaq3">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/perlfaq3">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/perlfaq3">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/perlfaq3">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/perlfaq3">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/perlfaq3">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/perlfaq3">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/perlfaq3">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/perlfaq3">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/perlfaq3">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/perlfaq3">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/perlfaq3">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/perlfaq3">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/perlfaq3">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/perlfaq3">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/perlfaq3">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/perlfaq3">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/perlfaq3">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/perlfaq3">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/perlfaq3">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq3.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/perlfaq3">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/perlfaq3">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/perlfaq3">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/perlfaq3">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/perlfaq3">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/perlfaq3">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/perlfaq3">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/perlfaq3">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/perlfaq3">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/perlfaq3">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/perlfaq3">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/perlfaq3">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/perlfaq3">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/perlfaq3">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/perlfaq3">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/perlfaq3">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/perlfaq3">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/perlfaq3">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/perlfaq3">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/perlfaq3">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/perlfaq3">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/perlfaq3">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/perlfaq3">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/perlfaq3">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/perlfaq3">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/perlfaq3">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/perlfaq3">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/perlfaq3">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/perlfaq3">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/perlfaq3">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/perlfaq3">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/perlfaq3">5.35.1</a>
          <a class="dropdown-item active" href="perlfaq3.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="perlfaq3.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="perlfaq3.html">perlfaq3</a>
          <div id="more">
            (<a href="perlfaq3.txt">source</a>,
            <a href="https://metacpan.org/pod/perlfaq3">CPAN</a>)
          </div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#VERSION">VERSION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-do-I-do-(anything)?">How do I do (anything)?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-use-Perl-interactively?">How can I use Perl interactively?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-do-I-find-which-modules-are-installed-on-my-system?">How do I find which modules are installed on my system?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-do-I-debug-my-Perl-programs?">How do I debug my Perl programs?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-do-I-profile-my-Perl-programs?">How do I profile my Perl programs?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-do-I-cross-reference-my-Perl-programs?">How do I cross-reference my Perl programs?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Is-there-a-pretty-printer-(formatter)-for-Perl?">Is there a pretty-printer (formatter) for Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Is-there-an-IDE-or-Windows-Perl-Editor?">Is there an IDE or Windows Perl Editor?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Where-can-I-get-Perl-macros-for-vi?">Where can I get Perl macros for vi?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Where-can-I-get-perl-mode-or-cperl-mode-for-emacs?">Where can I get perl-mode or cperl-mode for emacs? </a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-use-curses-with-Perl?">How can I use curses with Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-write-a-GUI-(X,-Tk,-Gtk,-etc.)-in-Perl?">How can I write a GUI (X, Tk, Gtk, etc.) in Perl?        </a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-make-my-Perl-program-run-faster?">How can I make my Perl program run faster?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-make-my-Perl-program-take-less-memory?">How can I make my Perl program take less memory?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Is-it-safe-to-return-a-reference-to-local-or-lexical-data?">Is it safe to return a reference to local or lexical data?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-free-an-array-or-hash-so-my-program-shrinks?">How can I free an array or hash so my program shrinks?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-make-my-CGI-script-more-efficient?">How can I make my CGI script more efficient?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-hide-the-source-for-my-Perl-program?">How can I hide the source for my Perl program?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-compile-my-Perl-program-into-byte-code-or-C?">How can I compile my Perl program into byte code or C?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#How-can-I-get-%23!perl-to-work-on-%5BMS-DOS,NT,...%5D?">How can I get #!perl to work on [MS-DOS,NT,...]?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Can-I-write-useful-Perl-programs-on-the-command-line?">Can I write useful Perl programs on the command line?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Why-don&#39;t-Perl-one-liners-work-on-my-DOS/Mac/VMS-system?">Why don&#39;t Perl one-liners work on my DOS/Mac/VMS system?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Where-can-I-learn-about-CGI-or-Web-programming-in-Perl?">Where can I learn about CGI or Web programming in Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Where-can-I-learn-about-object-oriented-Perl-programming?">Where can I learn about object-oriented Perl programming?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#Where-can-I-learn-about-linking-C-with-Perl?">Where can I learn about linking C with Perl?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#I&#39;ve-read-perlembed,-perlguts,-etc.,-but-I-can&#39;t-embed-perl-in-my-C-program;-what-am-I-doing-wrong?">I&#39;ve read perlembed, perlguts, etc., but I can&#39;t embed perl in my C program; what am I doing wrong?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#When-I-tried-to-run-my-script,-I-got-this-message.-What-does-it-mean?">When I tried to run my script, I got this message. What does it mean?</a>
              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#What&#39;s-MakeMaker?">What&#39;s MakeMaker?</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="perlfaq3.html#AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="perlfaq3.html#NAME">#</a>NAME</h1>

<p>perlfaq3 - Programming Tools</p>

<h1 id="VERSION"><a class="permalink" href="perlfaq3.html#VERSION">#</a>VERSION</h1>

<p>version 5.20210411</p>

<h1 id="DESCRIPTION"><a class="permalink" href="perlfaq3.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>This section of the FAQ answers questions related to programmer tools and programming support.</p>

<h2 id="How-do-I-do-(anything)?"><a class="permalink" href="perlfaq3.html#How-do-I-do-(anything)?">#</a><a id="How"></a><a id="How-do-I-do-anything"></a>How do I do (anything)?</h2>

<p>Have you looked at CPAN (see <a href="perlfaq2.html">perlfaq2</a>)? The chances are that someone has already written a module that can solve your problem. Have you read the appropriate manpages? Here&#39;s a brief index:</p>

<dl>

<dt id="Basics"><a class="permalink" href="perlfaq3.html#Basics">#</a>Basics</dt>
<dd>

<dl>

<dt id="perldata-Perl-data-types"><a class="permalink" href="perlfaq3.html#perldata-Perl-data-types">#</a><a id="perldata"></a><a id="perldata---Perl-data-types"></a><a href="perldata.html">perldata</a> - Perl data types</dt>
<dd>

</dd>
<dt id="perlvar-Perl-pre-defined-variables"><a class="permalink" href="perlfaq3.html#perlvar-Perl-pre-defined-variables">#</a><a id="perlvar"></a><a id="perlvar---Perl-pre-defined-variables"></a><a href="perlvar.html">perlvar</a> - Perl pre-defined variables</dt>
<dd>

</dd>
<dt id="perlsyn-Perl-syntax"><a class="permalink" href="perlfaq3.html#perlsyn-Perl-syntax">#</a><a id="perlsyn"></a><a id="perlsyn---Perl-syntax"></a><a href="perlsyn.html">perlsyn</a> - Perl syntax</dt>
<dd>

</dd>
<dt id="perlop-Perl-operators-and-precedence"><a class="permalink" href="perlfaq3.html#perlop-Perl-operators-and-precedence">#</a><a id="perlop"></a><a id="perlop---Perl-operators-and-precedence"></a><a href="perlop.html">perlop</a> - Perl operators and precedence</dt>
<dd>

</dd>
<dt id="perlsub-Perl-subroutines"><a class="permalink" href="perlfaq3.html#perlsub-Perl-subroutines">#</a><a id="perlsub"></a><a id="perlsub---Perl-subroutines"></a><a href="perlsub.html">perlsub</a> - Perl subroutines</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Execution"><a class="permalink" href="perlfaq3.html#Execution">#</a>Execution</dt>
<dd>

<dl>

<dt id="perlrun-how-to-execute-the-Perl-interpreter"><a class="permalink" href="perlfaq3.html#perlrun-how-to-execute-the-Perl-interpreter">#</a><a id="perlrun"></a><a id="perlrun---how-to-execute-the-Perl-interpreter"></a><a href="perlrun.html">perlrun</a> - how to execute the Perl interpreter</dt>
<dd>

</dd>
<dt id="perldebug-Perl-debugging"><a class="permalink" href="perlfaq3.html#perldebug-Perl-debugging">#</a><a id="perldebug"></a><a id="perldebug---Perl-debugging"></a><a href="perldebug.html">perldebug</a> - Perl debugging</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Functions"><a class="permalink" href="perlfaq3.html#Functions">#</a>Functions</dt>
<dd>

<dl>

<dt id="perlfunc-Perl-builtin-functions"><a class="permalink" href="perlfaq3.html#perlfunc-Perl-builtin-functions">#</a><a id="perlfunc"></a><a id="perlfunc---Perl-builtin-functions"></a><a href="perlfunc.html">perlfunc</a> - Perl builtin functions</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Objects"><a class="permalink" href="perlfaq3.html#Objects">#</a>Objects</dt>
<dd>

<dl>

<dt id="perlref-Perl-references-and-nested-data-structures"><a class="permalink" href="perlfaq3.html#perlref-Perl-references-and-nested-data-structures">#</a><a id="perlref"></a><a id="perlref---Perl-references-and-nested-data-structures"></a><a href="perlref.html">perlref</a> - Perl references and nested data structures</dt>
<dd>

</dd>
<dt id="perlmod-Perl-modules-(packages-and-symbol-tables)"><a class="permalink" href="perlfaq3.html#perlmod-Perl-modules-(packages-and-symbol-tables)">#</a><a id="perlmod"></a><a id="perlmod---Perl-modules-packages-and-symbol-tables"></a><a href="perlmod.html">perlmod</a> - Perl modules (packages and symbol tables)</dt>
<dd>

</dd>
<dt id="perlobj-Perl-objects"><a class="permalink" href="perlfaq3.html#perlobj-Perl-objects">#</a><a id="perlobj"></a><a id="perlobj---Perl-objects"></a><a href="perlobj.html">perlobj</a> - Perl objects</dt>
<dd>

</dd>
<dt id="perltie-how-to-hide-an-object-class-in-a-simple-variable"><a class="permalink" href="perlfaq3.html#perltie-how-to-hide-an-object-class-in-a-simple-variable">#</a><a id="perltie"></a><a id="perltie---how-to-hide-an-object-class-in-a-simple-variable"></a><a href="perltie.html">perltie</a> - how to hide an object class in a simple variable</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Data-Structures"><a class="permalink" href="perlfaq3.html#Data-Structures">#</a><a id="Data"></a>Data Structures</dt>
<dd>

<dl>

<dt id="perlref-Perl-references-and-nested-data-structures1"><a class="permalink" href="perlfaq3.html#perlref-Perl-references-and-nested-data-structures1">#</a><a id="perlref1"></a><a id="perlref---Perl-references-and-nested-data-structures1"></a><a href="perlref.html">perlref</a> - Perl references and nested data structures</dt>
<dd>

</dd>
<dt id="perllol-Manipulating-arrays-of-arrays-in-Perl"><a class="permalink" href="perlfaq3.html#perllol-Manipulating-arrays-of-arrays-in-Perl">#</a><a id="perllol"></a><a id="perllol---Manipulating-arrays-of-arrays-in-Perl"></a><a href="perllol.html">perllol</a> - Manipulating arrays of arrays in Perl</dt>
<dd>

</dd>
<dt id="perldsc-Perl-Data-Structures-Cookbook"><a class="permalink" href="perlfaq3.html#perldsc-Perl-Data-Structures-Cookbook">#</a><a id="perldsc"></a><a id="perldsc---Perl-Data-Structures-Cookbook"></a><a href="perldsc.html">perldsc</a> - Perl Data Structures Cookbook</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Modules"><a class="permalink" href="perlfaq3.html#Modules">#</a>Modules</dt>
<dd>

<dl>

<dt id="perlmod-Perl-modules-(packages-and-symbol-tables)1"><a class="permalink" href="perlfaq3.html#perlmod-Perl-modules-(packages-and-symbol-tables)1">#</a><a id="perlmod1"></a><a id="perlmod---Perl-modules-packages-and-symbol-tables1"></a><a href="perlmod.html">perlmod</a> - Perl modules (packages and symbol tables)</dt>
<dd>

</dd>
<dt id="perlmodlib-constructing-new-Perl-modules-and-finding-existing-ones"><a class="permalink" href="perlfaq3.html#perlmodlib-constructing-new-Perl-modules-and-finding-existing-ones">#</a><a id="perlmodlib"></a><a id="perlmodlib---constructing-new-Perl-modules-and-finding-existing-ones"></a><a href="perlmodlib.html">perlmodlib</a> - constructing new Perl modules and finding existing ones</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Regexes"><a class="permalink" href="perlfaq3.html#Regexes">#</a>Regexes</dt>
<dd>

<dl>

<dt id="perlre-Perl-regular-expressions"><a class="permalink" href="perlfaq3.html#perlre-Perl-regular-expressions">#</a><a id="perlre"></a><a id="perlre---Perl-regular-expressions"></a><a href="perlre.html">perlre</a> - Perl regular expressions</dt>
<dd>

</dd>
<dt id="perlfunc-Perl-builtin-functions&gt;"><a class="permalink" href="perlfaq3.html#perlfunc-Perl-builtin-functions%3E">#</a><a id="perlfunc1"></a><a id="perlfunc---Perl-builtin-functions1"></a><a href="perlfunc.html">perlfunc</a> - Perl builtin functions&gt;</dt>
<dd>

</dd>
<dt id="perlop-Perl-operators-and-precedence1"><a class="permalink" href="perlfaq3.html#perlop-Perl-operators-and-precedence1">#</a><a id="perlop1"></a><a id="perlop---Perl-operators-and-precedence1"></a><a href="perlop.html">perlop</a> - Perl operators and precedence</dt>
<dd>

</dd>
<dt id="perllocale-Perl-locale-handling-(internationalization-and-localization)"><a class="permalink" href="perlfaq3.html#perllocale-Perl-locale-handling-(internationalization-and-localization)">#</a><a id="perllocale"></a><a id="perllocale---Perl-locale-handling-internationalization-and-localization"></a><a href="perllocale.html">perllocale</a> - Perl locale handling (internationalization and localization)</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Moving-to-perl5"><a class="permalink" href="perlfaq3.html#Moving-to-perl5">#</a><a id="Moving"></a>Moving to perl5</dt>
<dd>

<dl>

<dt id="perltrap-Perl-traps-for-the-unwary"><a class="permalink" href="perlfaq3.html#perltrap-Perl-traps-for-the-unwary">#</a><a id="perltrap"></a><a id="perltrap---Perl-traps-for-the-unwary"></a><a href="perltrap.html">perltrap</a> - Perl traps for the unwary</dt>
<dd>

</dd>
<dt id="perl"><a class="permalink" href="perlfaq3.html#perl">#</a><a href="perl.html">perl</a></dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Linking-with-C"><a class="permalink" href="perlfaq3.html#Linking-with-C">#</a><a id="Linking"></a>Linking with C</dt>
<dd>

<dl>

<dt id="perlxstut-Tutorial-for-writing-XSUBs"><a class="permalink" href="perlfaq3.html#perlxstut-Tutorial-for-writing-XSUBs">#</a><a id="perlxstut"></a><a id="perlxstut---Tutorial-for-writing-XSUBs"></a><a href="perlxstut.html">perlxstut</a> - Tutorial for writing XSUBs</dt>
<dd>

</dd>
<dt id="perlxs-XS-language-reference-manual"><a class="permalink" href="perlfaq3.html#perlxs-XS-language-reference-manual">#</a><a id="perlxs"></a><a id="perlxs---XS-language-reference-manual"></a><a href="perlxs.html">perlxs</a> - XS language reference manual</dt>
<dd>

</dd>
<dt id="perlcall-Perl-calling-conventions-from-C"><a class="permalink" href="perlfaq3.html#perlcall-Perl-calling-conventions-from-C">#</a><a id="perlcall"></a><a id="perlcall---Perl-calling-conventions-from-C"></a><a href="perlcall.html">perlcall</a> - Perl calling conventions from C</dt>
<dd>

</dd>
<dt id="perlguts-Introduction-to-the-Perl-API"><a class="permalink" href="perlfaq3.html#perlguts-Introduction-to-the-Perl-API">#</a><a id="perlguts"></a><a id="perlguts---Introduction-to-the-Perl-API"></a><a href="perlguts.html">perlguts</a> - Introduction to the Perl API</dt>
<dd>

</dd>
<dt id="perlembed-how-to-embed-perl-in-your-C-program"><a class="permalink" href="perlfaq3.html#perlembed-how-to-embed-perl-in-your-C-program">#</a><a id="perlembed"></a><a id="perlembed---how-to-embed-perl-in-your-C-program"></a><a href="perlembed.html">perlembed</a> - how to embed perl in your C program</dt>
<dd>

</dd>
</dl>

</dd>
<dt id="Various"><a class="permalink" href="perlfaq3.html#Various">#</a>Various</dt>
<dd>

<p><a href="http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz">http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz</a> (not a man-page but still useful, a collection of various essays on Perl techniques)</p>

</dd>
</dl>

<p>A crude table of contents for the Perl manpage set is found in <a href="perltoc.html">perltoc</a>.</p>

<h2 id="How-can-I-use-Perl-interactively?"><a class="permalink" href="perlfaq3.html#How-can-I-use-Perl-interactively?">#</a><a id="How1"></a><a id="How-can-I-use-Perl-interactively"></a>How can I use Perl interactively?</h2>

<p>The typical approach uses the Perl debugger, described in the <a href="http://man.he.net/man1/perldebug">perldebug(1)</a> manpage, on an &quot;empty&quot; program, like this:</p>

<pre><code class="plaintext">perl -de 42</code></pre>

<p>Now just type in any legal Perl code, and it will be immediately evaluated. You can also examine the symbol table, get stack backtraces, check variable values, set breakpoints, and other operations typically found in symbolic debuggers.</p>

<p>You can also use <a href="./Devel::REPL.html">Devel::REPL</a> which is an interactive shell for Perl, commonly known as a REPL - Read, Evaluate, Print, Loop. It provides various handy features.</p>

<h2 id="How-do-I-find-which-modules-are-installed-on-my-system?"><a class="permalink" href="perlfaq3.html#How-do-I-find-which-modules-are-installed-on-my-system?">#</a><a id="How2"></a><a id="How-do-I-find-which-modules-are-installed-on-my-system"></a>How do I find which modules are installed on my system?</h2>

<p>From the command line, you can use the <code>cpan</code> command&#39;s <code>-l</code> switch:</p>

<pre><code class="plaintext">$ cpan -l</code></pre>

<p>You can also use <code>cpan</code>&#39;s <code>-a</code> switch to create an autobundle file that <code>CPAN.pm</code> understands and can use to re-install every module:</p>

<pre><code class="plaintext">$ cpan -a</code></pre>

<p>Inside a Perl program, you can use the <a href="./ExtUtils::Installed.html">ExtUtils::Installed</a> module to show all installed distributions, although it can take awhile to do its magic. The standard library which comes with Perl just shows up as &quot;Perl&quot; (although you can get those with <a href="./Module::CoreList.html">Module::CoreList</a>).</p>

<pre><code>use ExtUtils::Installed;

my $inst    = ExtUtils::Installed-&gt;new();
my @modules = $inst-&gt;modules();</code></pre>

<p>If you want a list of all of the Perl module filenames, you can use <a href="./File::Find::Rule.html">File::Find::Rule</a>:</p>

<pre><code>use File::Find::Rule;

my @files = File::Find::Rule-&gt;
    extras({follow =&gt; 1})-&gt;
    file()-&gt;
    name( &#39;*.pm&#39; )-&gt;
    in( @INC )
    ;</code></pre>

<p>If you do not have that module, you can do the same thing with <a href="./File::Find.html">File::Find</a> which is part of the standard library:</p>

<pre><code>use File::Find;
my @files;

find(
    {
    wanted =&gt; sub {
        push @files, $File::Find::fullname
        if -f $File::Find::fullname &amp;&amp; /\.pm$/
    },
    follow =&gt; 1,
    follow_skip =&gt; 2,
    },
    @INC
);

print join &quot;\n&quot;, @files;</code></pre>

<p>If you simply need to check quickly to see if a module is available, you can check for its documentation. If you can read the documentation the module is most likely installed. If you cannot read the documentation, the module might not have any (in rare cases):</p>

<pre><code class="plaintext">$ perldoc Module::Name</code></pre>

<p>You can also try to include the module in a one-liner to see if perl finds it:</p>

<pre><code class="plaintext">$ perl -MModule::Name -e1</code></pre>

<p>(If you don&#39;t receive a &quot;Can&#39;t locate ... in @INC&quot; error message, then Perl found the module name you asked for.)</p>

<h2 id="How-do-I-debug-my-Perl-programs?"><a class="permalink" href="perlfaq3.html#How-do-I-debug-my-Perl-programs?">#</a><a id="How3"></a><a id="How-do-I-debug-my-Perl-programs"></a>How do I debug my Perl programs?</h2>

<p>(contributed by brian d foy)</p>

<p>Before you do anything else, you can help yourself by ensuring that you let Perl tell you about problem areas in your code. By turning on warnings and strictures, you can head off many problems before they get too big. You can find out more about these in <a href="strict.html">strict</a> and <a href="warnings.html">warnings</a>.</p>

<pre><code>#!/usr/bin/perl
use strict;
use warnings;</code></pre>

<p>Beyond that, the simplest debugger is the <code>print</code> function. Use it to look at values as you run your program:</p>

<pre><code>print STDERR &quot;The value is [$value]\n&quot;;</code></pre>

<p>The <a href="./Data::Dumper.html">Data::Dumper</a> module can pretty-print Perl data structures:</p>

<pre><code>use Data::Dumper qw( Dumper );
print STDERR &quot;The hash is &quot; . Dumper( \%hash ) . &quot;\n&quot;;</code></pre>

<p>Perl comes with an interactive debugger, which you can start with the <code>-d</code> switch. It&#39;s fully explained in <a href="perldebug.html">perldebug</a>.</p>

<p>If you&#39;d like a graphical user interface and you have <a href="Tk.html">Tk</a>, you can use <code>ptkdb</code>. It&#39;s on CPAN and available for free.</p>

<p>If you need something much more sophisticated and controllable, Leon Brocard&#39;s <a href="./Devel::ebug.html">Devel::ebug</a> (which you can call with the <code>-D</code> switch as <code>-Debug</code>) gives you the programmatic hooks into everything you need to write your own (without too much pain and suffering).</p>

<p>You can also use a commercial debugger such as Affrus (Mac OS X), Komodo from Activestate (Windows and Mac OS X), or EPIC (most platforms).</p>

<h2 id="How-do-I-profile-my-Perl-programs?"><a class="permalink" href="perlfaq3.html#How-do-I-profile-my-Perl-programs?">#</a><a id="How4"></a><a id="How-do-I-profile-my-Perl-programs"></a>How do I profile my Perl programs?</h2>

<p>(contributed by brian d foy, updated Fri Jul 25 12:22:26 PDT 2008)</p>

<p>The <code>Devel</code> namespace has several modules which you can use to profile your Perl programs.</p>

<p>The <a href="./Devel::NYTProf.html">Devel::NYTProf</a> (New York Times Profiler) does both statement and subroutine profiling. It&#39;s available from CPAN and you also invoke it with the <code>-d</code> switch:</p>

<pre><code class="plaintext">perl -d:NYTProf some_perl.pl</code></pre>

<p>It creates a database of the profile information that you can turn into reports. The <code>nytprofhtml</code> command turns the data into an HTML report similar to the <a href="./Devel::Cover.html">Devel::Cover</a> report:</p>

<pre><code class="plaintext">nytprofhtml</code></pre>

<p>You might also be interested in using the <a href="Benchmark.html">Benchmark</a> to measure and compare code snippets.</p>

<p>You can read more about profiling in <i>Programming Perl</i>, chapter 20, or <i>Mastering Perl</i>, chapter 5.</p>

<p><a href="perldebguts.html">perldebguts</a> documents creating a custom debugger if you need to create a special sort of profiler. brian d foy describes the process in <i>The Perl Journal</i>, &quot;Creating a Perl Debugger&quot;, <a href="http://www.ddj.com/184404522">http://www.ddj.com/184404522</a> , and &quot;Profiling in Perl&quot; <a href="http://www.ddj.com/184404580">http://www.ddj.com/184404580</a> .</p>

<p>Perl.com has two interesting articles on profiling: &quot;Profiling Perl&quot;, by Simon Cozens, <a href="https://www.perl.com/pub/2004/06/25/profiling.html/">https://www.perl.com/pub/2004/06/25/profiling.html/</a> and &quot;Debugging and Profiling mod_perl Applications&quot;, by Frank Wiles, <a href="http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html">http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html</a> .</p>

<p>Randal L. Schwartz writes about profiling in &quot;Speeding up Your Perl Programs&quot; for <i>Unix Review</i>, <a href="http://www.stonehenge.com/merlyn/UnixReview/col49.html">http://www.stonehenge.com/merlyn/UnixReview/col49.html</a> , and &quot;Profiling in Template Toolkit via Overriding&quot; for <i>Linux Magazine</i>, <a href="http://www.stonehenge.com/merlyn/LinuxMag/col75.html">http://www.stonehenge.com/merlyn/LinuxMag/col75.html</a> .</p>

<h2 id="How-do-I-cross-reference-my-Perl-programs?"><a class="permalink" href="perlfaq3.html#How-do-I-cross-reference-my-Perl-programs?">#</a><a id="How5"></a><a id="How-do-I-cross-reference-my-Perl-programs"></a>How do I cross-reference my Perl programs?</h2>

<p>The <a href="./B::Xref.html">B::Xref</a> module can be used to generate cross-reference reports for Perl programs.</p>

<pre><code class="plaintext">perl -MO=Xref[,OPTIONS] scriptname.plx</code></pre>

<h2 id="Is-there-a-pretty-printer-(formatter)-for-Perl?"><a class="permalink" href="perlfaq3.html#Is-there-a-pretty-printer-(formatter)-for-Perl?">#</a><a id="Is"></a><a id="Is-there-a-pretty-printer-formatter-for-Perl"></a>Is there a pretty-printer (formatter) for Perl?</h2>

<p><a href="./Perl::Tidy.html">Perl::Tidy</a> comes with a perl script <a href="perltidy.html">perltidy</a> which indents and reformats Perl scripts to make them easier to read by trying to follow the rules of the <a href="perlstyle.html">perlstyle</a>. If you write Perl, or spend much time reading Perl, you will probably find it useful.</p>

<p>Of course, if you simply follow the guidelines in <a href="perlstyle.html">perlstyle</a>, you shouldn&#39;t need to reformat. The habit of formatting your code as you write it will help prevent bugs. Your editor can and should help you with this. The perl-mode or newer cperl-mode for emacs can provide remarkable amounts of help with most (but not all) code, and even less programmable editors can provide significant assistance. Tom Christiansen and many other VI users swear by the following settings in vi and its clones:</p>

<pre><code class="plaintext">set ai sw=4
map! ^O {^M}^[O^T</code></pre>

<p>Put that in your <i>.exrc</i> file (replacing the caret characters with control characters) and away you go. In insert mode, ^T is for indenting, ^D is for undenting, and ^O is for blockdenting--as it were. A more complete example, with comments, can be found at <a href="http://www.cpan.org/authors/id/T/TO/TOMC/scripts/toms.exrc.gz">http://www.cpan.org/authors/id/T/TO/TOMC/scripts/toms.exrc.gz</a></p>

<h2 id="Is-there-an-IDE-or-Windows-Perl-Editor?"><a class="permalink" href="perlfaq3.html#Is-there-an-IDE-or-Windows-Perl-Editor?">#</a><a id="Is1"></a><a id="Is-there-an-IDE-or-Windows-Perl-Editor"></a>Is there an IDE or Windows Perl Editor?</h2>

<p>Perl programs are just plain text, so any editor will do.</p>

<p>If you&#39;re on Unix, you already have an IDE--Unix itself. The Unix philosophy is the philosophy of several small tools that each do one thing and do it well. It&#39;s like a carpenter&#39;s toolbox.</p>

<p>If you want an IDE, check the following (in alphabetical order, not order of preference):</p>

<dl>

<dt id="Eclipse"><a class="permalink" href="perlfaq3.html#Eclipse">#</a>Eclipse</dt>
<dd>

<p><a href="http://e-p-i-c.sf.net/">http://e-p-i-c.sf.net/</a></p>

<p>The Eclipse Perl Integration Project integrates Perl editing/debugging with Eclipse.</p>

</dd>
<dt id="Enginsite"><a class="permalink" href="perlfaq3.html#Enginsite">#</a>Enginsite</dt>
<dd>

<p><a href="http://www.enginsite.com/">http://www.enginsite.com/</a></p>

<p>Perl Editor by EngInSite is a complete integrated development environment (IDE) for creating, testing, and debugging Perl scripts; the tool runs on Windows 9x/NT/2000/XP or later.</p>

</dd>
<dt id="IntelliJ-IDEA"><a class="permalink" href="perlfaq3.html#IntelliJ-IDEA">#</a><a id="IntelliJ"></a>IntelliJ IDEA</dt>
<dd>

<p><a href="https://plugins.jetbrains.com/plugin/7796">https://plugins.jetbrains.com/plugin/7796</a></p>

<p>Camelcade plugin provides Perl5 support in IntelliJ IDEA and other JetBrains IDEs.</p>

</dd>
<dt id="Kephra"><a class="permalink" href="perlfaq3.html#Kephra">#</a>Kephra</dt>
<dd>

<p><a href="http://kephra.sf.net">http://kephra.sf.net</a></p>

<p>GUI editor written in Perl using wxWidgets and Scintilla with lots of smaller features. Aims for a UI based on Perl principles like TIMTOWTDI and &quot;easy things should be easy, hard things should be possible&quot;.</p>

</dd>
<dt id="Komodo"><a class="permalink" href="perlfaq3.html#Komodo">#</a>Komodo</dt>
<dd>

<p><a href="http://www.ActiveState.com/Products/Komodo/">http://www.ActiveState.com/Products/Komodo/</a></p>

<p>ActiveState&#39;s cross-platform (as of October 2004, that&#39;s Windows, Linux, and Solaris), multi-language IDE has Perl support, including a regular expression debugger and remote debugging.</p>

</dd>
<dt id="Notepad++"><a class="permalink" href="perlfaq3.html#Notepad++">#</a><a id="Notepad"></a>Notepad++</dt>
<dd>

<p><a href="http://notepad-plus.sourceforge.net/">http://notepad-plus.sourceforge.net/</a></p>

</dd>
<dt id="Open-Perl-IDE"><a class="permalink" href="perlfaq3.html#Open-Perl-IDE">#</a><a id="Open"></a>Open Perl IDE</dt>
<dd>

<p><a href="http://open-perl-ide.sourceforge.net/">http://open-perl-ide.sourceforge.net/</a></p>

<p>Open Perl IDE is an integrated development environment for writing and debugging Perl scripts with ActiveState&#39;s ActivePerl distribution under Windows 95/98/NT/2000.</p>

</dd>
<dt id="OptiPerl"><a class="permalink" href="perlfaq3.html#OptiPerl">#</a>OptiPerl</dt>
<dd>

<p><a href="http://www.optiperl.com/">http://www.optiperl.com/</a></p>

<p>OptiPerl is a Windows IDE with simulated CGI environment, including debugger and syntax-highlighting editor.</p>

</dd>
<dt id="Padre"><a class="permalink" href="perlfaq3.html#Padre">#</a>Padre</dt>
<dd>

<p><a href="http://padre.perlide.org/">http://padre.perlide.org/</a></p>

<p>Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide a native look and feel. It&#39;s open source under the Artistic License. It is one of the newer Perl IDEs.</p>

</dd>
<dt id="PerlBuilder"><a class="permalink" href="perlfaq3.html#PerlBuilder">#</a>PerlBuilder</dt>
<dd>

<p><a href="http://www.solutionsoft.com/perl.htm">http://www.solutionsoft.com/perl.htm</a></p>

<p>PerlBuilder is an integrated development environment for Windows that supports Perl development.</p>

</dd>
<dt id="visiPerl+"><a class="permalink" href="perlfaq3.html#visiPerl+">#</a><a id="visiPerl"></a>visiPerl+</dt>
<dd>

<p><a href="http://helpconsulting.net/visiperl/index.html">http://helpconsulting.net/visiperl/index.html</a></p>

<p>From Help Consulting, for Windows.</p>

</dd>
<dt id="Visual-Perl"><a class="permalink" href="perlfaq3.html#Visual-Perl">#</a><a id="Visual"></a>Visual Perl</dt>
<dd>

<p><a href="http://www.activestate.com/Products/Visual_Perl/">http://www.activestate.com/Products/Visual_Perl/</a></p>

<p>Visual Perl is a Visual Studio.NET plug-in from ActiveState.</p>

</dd>
<dt id="Zeus"><a class="permalink" href="perlfaq3.html#Zeus">#</a>Zeus</dt>
<dd>

<p><a href="http://www.zeusedit.com/lookmain.html">http://www.zeusedit.com/lookmain.html</a></p>

<p>Zeus for Windows is another Win32 multi-language editor/IDE that comes with support for Perl.</p>

</dd>
</dl>

<p>For editors: if you&#39;re on Unix you probably have vi or a vi clone already, and possibly an emacs too, so you may not need to download anything. In any emacs the cperl-mode (M-x cperl-mode) gives you perhaps the best available Perl editing mode in any editor.</p>

<p>If you are using Windows, you can use any editor that lets you work with plain text, such as NotePad or WordPad. Word processors, such as Microsoft Word or WordPerfect, typically do not work since they insert all sorts of behind-the-scenes information, although some allow you to save files as &quot;Text Only&quot;. You can also download text editors designed specifically for programming, such as Textpad ( <a href="http://www.textpad.com/">http://www.textpad.com/</a> ) and UltraEdit ( <a href="http://www.ultraedit.com/">http://www.ultraedit.com/</a> ), among others.</p>

<p>If you are using MacOS, the same concerns apply. MacPerl (for Classic environments) comes with a simple editor. Popular external editors are BBEdit ( <a href="http://www.barebones.com/products/bbedit/">http://www.barebones.com/products/bbedit/</a> ) or Alpha ( <a href="http://www.his.com/~jguyer/Alpha/Alpha8.html">http://www.his.com/~jguyer/Alpha/Alpha8.html</a> ). MacOS X users can use Unix editors as well.</p>

<dl>

<dt id="GNU-Emacs"><a class="permalink" href="perlfaq3.html#GNU-Emacs">#</a><a id="GNU"></a>GNU Emacs</dt>
<dd>

<p><a href="http://www.gnu.org/software/emacs/windows/ntemacs.html">http://www.gnu.org/software/emacs/windows/ntemacs.html</a></p>

</dd>
<dt id="MicroEMACS"><a class="permalink" href="perlfaq3.html#MicroEMACS">#</a>MicroEMACS</dt>
<dd>

<p><a href="http://www.microemacs.de/">http://www.microemacs.de/</a></p>

</dd>
<dt id="XEmacs"><a class="permalink" href="perlfaq3.html#XEmacs">#</a>XEmacs</dt>
<dd>

<p><a href="http://www.xemacs.org/Download/index.html">http://www.xemacs.org/Download/index.html</a></p>

</dd>
<dt id="Jed"><a class="permalink" href="perlfaq3.html#Jed">#</a>Jed</dt>
<dd>

<p><a href="http://space.mit.edu/~davis/jed/">http://space.mit.edu/~davis/jed/</a></p>

</dd>
</dl>

<p>or a vi clone such as</p>

<dl>

<dt id="Vim"><a class="permalink" href="perlfaq3.html#Vim">#</a>Vim</dt>
<dd>

<p><a href="http://www.vim.org/">http://www.vim.org/</a></p>

</dd>
<dt id="Vile"><a class="permalink" href="perlfaq3.html#Vile">#</a>Vile</dt>
<dd>

<p><a href="http://invisible-island.net/vile/vile.html">http://invisible-island.net/vile/vile.html</a></p>

</dd>
</dl>

<p>The following are Win32 multilanguage editor/IDEs that support Perl:</p>

<dl>

<dt id="MultiEdit"><a class="permalink" href="perlfaq3.html#MultiEdit">#</a>MultiEdit</dt>
<dd>

<p><a href="http://www.MultiEdit.com/">http://www.MultiEdit.com/</a></p>

</dd>
<dt id="SlickEdit"><a class="permalink" href="perlfaq3.html#SlickEdit">#</a>SlickEdit</dt>
<dd>

<p><a href="http://www.slickedit.com/">http://www.slickedit.com/</a></p>

</dd>
<dt id="ConTEXT"><a class="permalink" href="perlfaq3.html#ConTEXT">#</a>ConTEXT</dt>
<dd>

<p><a href="http://www.contexteditor.org/">http://www.contexteditor.org/</a></p>

</dd>
</dl>

<p>There is also a toyedit Text widget based editor written in Perl that is distributed with the Tk module on CPAN. The ptkdb ( <a href="http://ptkdb.sourceforge.net/">http://ptkdb.sourceforge.net/</a> ) is a Perl/Tk-based debugger that acts as a development environment of sorts. Perl Composer ( <a href="http://perlcomposer.sourceforge.net/">http://perlcomposer.sourceforge.net/</a> ) is an IDE for Perl/Tk GUI creation.</p>

<p>In addition to an editor/IDE you might be interested in a more powerful shell environment for Win32. Your options include</p>

<dl>

<dt id="bash"><a class="permalink" href="perlfaq3.html#bash">#</a>bash</dt>
<dd>

<p>from the Cygwin package ( <a href="http://cygwin.com/">http://cygwin.com/</a> )</p>

</dd>
<dt id="zsh"><a class="permalink" href="perlfaq3.html#zsh">#</a>zsh</dt>
<dd>

<p><a href="http://www.zsh.org/">http://www.zsh.org/</a></p>

</dd>
</dl>

<p>Cygwin is covered by the GNU General Public License (but that shouldn&#39;t matter for Perl use). Cygwin contains (in addition to the shell) a comprehensive set of standard Unix toolkit utilities.</p>

<dl>

<dt id="BBEdit-and-TextWrangler"><a class="permalink" href="perlfaq3.html#BBEdit-and-TextWrangler">#</a><a id="BBEdit"></a>BBEdit and TextWrangler</dt>
<dd>

<p>are text editors for OS X that have a Perl sensitivity mode ( <a href="http://www.barebones.com/">http://www.barebones.com/</a> ).</p>

</dd>
</dl>

<h2 id="Where-can-I-get-Perl-macros-for-vi?"><a class="permalink" href="perlfaq3.html#Where-can-I-get-Perl-macros-for-vi?">#</a><a id="Where"></a><a id="Where-can-I-get-Perl-macros-for-vi"></a>Where can I get Perl macros for vi?</h2>

<p>For a complete version of Tom Christiansen&#39;s vi configuration file, see <a href="http://www.cpan.org/authors/id/T/TO/TOMC/scripts/toms.exrc.gz">http://www.cpan.org/authors/id/T/TO/TOMC/scripts/toms.exrc.gz</a> , the standard benchmark file for vi emulators. The file runs best with nvi, the current version of vi out of Berkeley, which incidentally can be built with an embedded Perl interpreter--see <a href="http://www.cpan.org/src/misc/">http://www.cpan.org/src/misc/</a> .</p>

<h2 id="Where-can-I-get-perl-mode-or-cperl-mode-for-emacs?"><a class="permalink" href="perlfaq3.html#Where-can-I-get-perl-mode-or-cperl-mode-for-emacs?">#</a><a id="Where1"></a><a id="Where-can-I-get-perl-mode-or-cperl-mode-for-emacs"></a>Where can I get perl-mode or cperl-mode for emacs? </h2>

<p>Since Emacs version 19 patchlevel 22 or so, there have been both a perl-mode.el and support for the Perl debugger built in. These should come with the standard Emacs 19 distribution.</p>

<p>Note that the perl-mode of emacs will have fits with <code>&quot;main&#39;foo&quot;</code> (single quote), and mess up the indentation and highlighting. You are probably using <code>&quot;main::foo&quot;</code> in new Perl code anyway, so this shouldn&#39;t be an issue.</p>

<p>For CPerlMode, see <a href="http://www.emacswiki.org/cgi-bin/wiki/CPerlMode">http://www.emacswiki.org/cgi-bin/wiki/CPerlMode</a></p>

<h2 id="How-can-I-use-curses-with-Perl?"><a class="permalink" href="perlfaq3.html#How-can-I-use-curses-with-Perl?">#</a><a id="How6"></a><a id="How-can-I-use-curses-with-Perl"></a>How can I use curses with Perl?</h2>

<p>The Curses module from CPAN provides a dynamically loadable object module interface to a curses library. A small demo can be found at the directory <a href="http://www.cpan.org/authors/id/T/TO/TOMC/scripts/rep.gz">http://www.cpan.org/authors/id/T/TO/TOMC/scripts/rep.gz</a> ; this program repeats a command and updates the screen as needed, rendering <b>rep ps axu</b> similar to <b>top</b>.</p>

<h2 id="How-can-I-write-a-GUI-(X,-Tk,-Gtk,-etc.)-in-Perl?"><a class="permalink" href="perlfaq3.html#How-can-I-write-a-GUI-(X,-Tk,-Gtk,-etc.)-in-Perl?">#</a><a id="How7"></a><a id="How-can-I-write-a-GUI-X-Tk-Gtk-etc.-in-Perl"></a>How can I write a GUI (X, Tk, Gtk, etc.) in Perl?        </h2>

<p>(contributed by Ben Morrow)</p>

<p>There are a number of modules which let you write GUIs in Perl. Most GUI toolkits have a perl interface: an incomplete list follows.</p>

<dl>

<dt id="Tk"><a class="permalink" href="perlfaq3.html#Tk">#</a>Tk</dt>
<dd>

<p>This works under Unix and Windows, and the current version doesn&#39;t look half as bad under Windows as it used to. Some of the gui elements still don&#39;t &#39;feel&#39; quite right, though. The interface is very natural and &#39;perlish&#39;, making it easy to use in small scripts that just need a simple gui. It hasn&#39;t been updated in a while.</p>

</dd>
<dt id="Wx"><a class="permalink" href="perlfaq3.html#Wx">#</a>Wx</dt>
<dd>

<p>This is a Perl binding for the cross-platform wxWidgets toolkit ( <a href="http://www.wxwidgets.org">http://www.wxwidgets.org</a> ). It works under Unix, Win32 and Mac OS X, using native widgets (Gtk under Unix). The interface follows the C++ interface closely, but the documentation is a little sparse for someone who doesn&#39;t know the library, mostly just referring you to the C++ documentation.</p>

</dd>
<dt id="Gtk-and-Gtk2"><a class="permalink" href="perlfaq3.html#Gtk-and-Gtk2">#</a><a id="Gtk"></a>Gtk and Gtk2</dt>
<dd>

<p>These are Perl bindings for the Gtk toolkit ( <a href="http://www.gtk.org">http://www.gtk.org</a> ). The interface changed significantly between versions 1 and 2 so they have separate Perl modules. It runs under Unix, Win32 and Mac OS X (currently it requires an X server on Mac OS, but a &#39;native&#39; port is underway), and the widgets look the same on every platform: i.e., they don&#39;t match the native widgets. As with Wx, the Perl bindings follow the C API closely, and the documentation requires you to read the C documentation to understand it.</p>

</dd>
<dt id="Win32::GUI"><a class="permalink" href="perlfaq3.html#Win32::GUI">#</a><a id="Win32"></a>Win32::GUI</dt>
<dd>

<p>This provides access to most of the Win32 GUI widgets from Perl. Obviously, it only runs under Win32, and uses native widgets. The Perl interface doesn&#39;t really follow the C interface: it&#39;s been made more Perlish, and the documentation is pretty good. More advanced stuff may require familiarity with the C Win32 APIs, or reference to MSDN.</p>

</dd>
<dt id="CamelBones"><a class="permalink" href="perlfaq3.html#CamelBones">#</a>CamelBones</dt>
<dd>

<p>CamelBones ( <a href="http://camelbones.sourceforge.net">http://camelbones.sourceforge.net</a> ) is a Perl interface to Mac OS X&#39;s Cocoa GUI toolkit, and as such can be used to produce native GUIs on Mac OS X. It&#39;s not on CPAN, as it requires frameworks that CPAN.pm doesn&#39;t know how to install, but installation is via the standard OSX package installer. The Perl API is, again, very close to the ObjC API it&#39;s wrapping, and the documentation just tells you how to translate from one to the other.</p>

</dd>
<dt id="Qt"><a class="permalink" href="perlfaq3.html#Qt">#</a>Qt</dt>
<dd>

<p>There is a Perl interface to TrollTech&#39;s Qt toolkit, but it does not appear to be maintained.</p>

</dd>
<dt id="Athena"><a class="permalink" href="perlfaq3.html#Athena">#</a>Athena</dt>
<dd>

<p>Sx is an interface to the Athena widget set which comes with X, but again it appears not to be much used nowadays.</p>

</dd>
</dl>

<h2 id="How-can-I-make-my-Perl-program-run-faster?"><a class="permalink" href="perlfaq3.html#How-can-I-make-my-Perl-program-run-faster?">#</a><a id="How8"></a><a id="How-can-I-make-my-Perl-program-run-faster"></a>How can I make my Perl program run faster?</h2>

<p>The best way to do this is to come up with a better algorithm. This can often make a dramatic difference. Jon Bentley&#39;s book <i>Programming Pearls</i> (that&#39;s not a misspelling!) has some good tips on optimization, too. Advice on benchmarking boils down to: benchmark and profile to make sure you&#39;re optimizing the right part, look for better algorithms instead of microtuning your code, and when all else fails consider just buying faster hardware. You will probably want to read the answer to the earlier question &quot;How do I profile my Perl programs?&quot; if you haven&#39;t done so already.</p>

<p>A different approach is to autoload seldom-used Perl code. See the AutoSplit and AutoLoader modules in the standard distribution for that. Or you could locate the bottleneck and think about writing just that part in C, the way we used to take bottlenecks in C code and write them in assembler. Similar to rewriting in C, modules that have critical sections can be written in C (for instance, the PDL module from CPAN).</p>

<p>If you&#39;re currently linking your perl executable to a shared <i>libc.so</i>, you can often gain a 10-25% performance benefit by rebuilding it to link with a static libc.a instead. This will make a bigger perl executable, but your Perl programs (and programmers) may thank you for it. See the <i>INSTALL</i> file in the source distribution for more information.</p>

<p>The undump program was an ancient attempt to speed up Perl program by storing the already-compiled form to disk. This is no longer a viable option, as it only worked on a few architectures, and wasn&#39;t a good solution anyway.</p>

<h2 id="How-can-I-make-my-Perl-program-take-less-memory?"><a class="permalink" href="perlfaq3.html#How-can-I-make-my-Perl-program-take-less-memory?">#</a><a id="How9"></a><a id="How-can-I-make-my-Perl-program-take-less-memory"></a>How can I make my Perl program take less memory?</h2>

<p>When it comes to time-space tradeoffs, Perl nearly always prefers to throw memory at a problem. Scalars in Perl use more memory than strings in C, arrays take more than that, and hashes use even more. While there&#39;s still a lot to be done, recent releases have been addressing these issues. For example, as of 5.004, duplicate hash keys are shared amongst all hashes using them, so require no reallocation.</p>

<p>In some cases, using substr() or vec() to simulate arrays can be highly beneficial. For example, an array of a thousand booleans will take at least 20,000 bytes of space, but it can be turned into one 125-byte bit vector--a considerable memory savings. The standard Tie::SubstrHash module can also help for certain types of data structure. If you&#39;re working with specialist data structures (matrices, for instance) modules that implement these in C may use less memory than equivalent Perl modules.</p>

<p>Another thing to try is learning whether your Perl was compiled with the system malloc or with Perl&#39;s builtin malloc. Whichever one it is, try using the other one and see whether this makes a difference. Information about malloc is in the <i>INSTALL</i> file in the source distribution. You can find out whether you are using perl&#39;s malloc by typing <code>perl -V:usemymalloc</code>.</p>

<p>Of course, the best way to save memory is to not do anything to waste it in the first place. Good programming practices can go a long way toward this:</p>

<dl>

<dt id="Don&#39;t-slurp!"><a class="permalink" href="perlfaq3.html#Don&#39;t-slurp!">#</a><a id="Don"></a><a id="Dont-slurp"></a>Don&#39;t slurp!</dt>
<dd>

<p>Don&#39;t read an entire file into memory if you can process it line by line. Or more concretely, use a loop like this:</p>

<pre><code>#
# Good Idea
#
while (my $line = &lt;$file_handle&gt;) {
   # ...
}</code></pre>

<p>instead of this:</p>

<pre><code>#
# Bad Idea
#
my @data = &lt;$file_handle&gt;;
foreach (@data) {
    # ...
}</code></pre>

<p>When the files you&#39;re processing are small, it doesn&#39;t much matter which way you do it, but it makes a huge difference when they start getting larger.</p>

</dd>
<dt id="Use-map-and-grep-selectively"><a class="permalink" href="perlfaq3.html#Use-map-and-grep-selectively">#</a><a id="Use"></a>Use map and grep selectively</dt>
<dd>

<p>Remember that both map and grep expect a LIST argument, so doing this:</p>

<pre><code>@wanted = grep {/pattern/} &lt;$file_handle&gt;;</code></pre>

<p>will cause the entire file to be slurped. For large files, it&#39;s better to loop:</p>

<pre><code>while (&lt;$file_handle&gt;) {
        push(@wanted, $_) if /pattern/;
}</code></pre>

</dd>
<dt id="Avoid-unnecessary-quotes-and-stringification"><a class="permalink" href="perlfaq3.html#Avoid-unnecessary-quotes-and-stringification">#</a><a id="Avoid"></a>Avoid unnecessary quotes and stringification</dt>
<dd>

<p>Don&#39;t quote large strings unless absolutely necessary:</p>

<pre><code>my $copy = &quot;$large_string&quot;;</code></pre>

<p>makes 2 copies of $large_string (one for $copy and another for the quotes), whereas</p>

<pre><code>my $copy = $large_string;</code></pre>

<p>only makes one copy.</p>

<p>Ditto for stringifying large arrays:</p>

<pre><code>{
local $, = &quot;\n&quot;;
print @big_array;
}</code></pre>

<p>is much more memory-efficient than either</p>

<pre><code>print join &quot;\n&quot;, @big_array;</code></pre>

<p>or</p>

<pre><code>{
local $&quot; = &quot;\n&quot;;
print &quot;@big_array&quot;;
}</code></pre>

</dd>
<dt id="Pass-by-reference"><a class="permalink" href="perlfaq3.html#Pass-by-reference">#</a><a id="Pass"></a>Pass by reference</dt>
<dd>

<p>Pass arrays and hashes by reference, not by value. For one thing, it&#39;s the only way to pass multiple lists or hashes (or both) in a single call/return. It also avoids creating a copy of all the contents. This requires some judgement, however, because any changes will be propagated back to the original data. If you really want to mangle (er, modify) a copy, you&#39;ll have to sacrifice the memory needed to make one.</p>

</dd>
<dt id="Tie-large-variables-to-disk"><a class="permalink" href="perlfaq3.html#Tie-large-variables-to-disk">#</a><a id="Tie"></a>Tie large variables to disk</dt>
<dd>

<p>For &quot;big&quot; data stores (i.e. ones that exceed available memory) consider using one of the DB modules to store it on disk instead of in RAM. This will incur a penalty in access time, but that&#39;s probably better than causing your hard disk to thrash due to massive swapping.</p>

</dd>
</dl>

<h2 id="Is-it-safe-to-return-a-reference-to-local-or-lexical-data?"><a class="permalink" href="perlfaq3.html#Is-it-safe-to-return-a-reference-to-local-or-lexical-data?">#</a><a id="Is2"></a><a id="Is-it-safe-to-return-a-reference-to-local-or-lexical-data"></a>Is it safe to return a reference to local or lexical data?</h2>

<p>Yes. Perl&#39;s garbage collection system takes care of this so everything works out right.</p>

<pre><code>sub makeone {
    my @a = ( 1 .. 10 );
    return \@a;
}

for ( 1 .. 10 ) {
    push @many, makeone();
}

print $many[4][5], &quot;\n&quot;;

print &quot;@many\n&quot;;</code></pre>

<h2 id="How-can-I-free-an-array-or-hash-so-my-program-shrinks?"><a class="permalink" href="perlfaq3.html#How-can-I-free-an-array-or-hash-so-my-program-shrinks?">#</a><a id="How10"></a><a id="How-can-I-free-an-array-or-hash-so-my-program-shrinks"></a>How can I free an array or hash so my program shrinks?</h2>

<p>(contributed by Michael Carman)</p>

<p>You usually can&#39;t. Memory allocated to lexicals (i.e. my() variables) cannot be reclaimed or reused even if they go out of scope. It is reserved in case the variables come back into scope. Memory allocated to global variables can be reused (within your program) by using undef() and/or delete().</p>

<p>On most operating systems, memory allocated to a program can never be returned to the system. That&#39;s why long-running programs sometimes re- exec themselves. Some operating systems (notably, systems that use mmap(2) for allocating large chunks of memory) can reclaim memory that is no longer used, but on such systems, perl must be configured and compiled to use the OS&#39;s malloc, not perl&#39;s.</p>

<p>In general, memory allocation and de-allocation isn&#39;t something you can or should be worrying about much in Perl.</p>

<p>See also &quot;How can I make my Perl program take less memory?&quot;</p>

<h2 id="How-can-I-make-my-CGI-script-more-efficient?"><a class="permalink" href="perlfaq3.html#How-can-I-make-my-CGI-script-more-efficient?">#</a><a id="How11"></a><a id="How-can-I-make-my-CGI-script-more-efficient"></a>How can I make my CGI script more efficient?</h2>

<p>Beyond the normal measures described to make general Perl programs faster or smaller, a CGI program has additional issues. It may be run several times per second. Given that each time it runs it will need to be re-compiled and will often allocate a megabyte or more of system memory, this can be a killer. Compiling into C <b>isn&#39;t going to help you</b> because the process start-up overhead is where the bottleneck is.</p>

<p>There are three popular ways to avoid this overhead. One solution involves running the Apache HTTP server (available from <a href="http://www.apache.org/">http://www.apache.org/</a> ) with either of the mod_perl or mod_fastcgi plugin modules.</p>

<p>With mod_perl and the Apache::Registry module (distributed with mod_perl), httpd will run with an embedded Perl interpreter which pre-compiles your script and then executes it within the same address space without forking. The Apache extension also gives Perl access to the internal server API, so modules written in Perl can do just about anything a module written in C can. For more on mod_perl, see <a href="http://perl.apache.org/">http://perl.apache.org/</a></p>

<p>With the FCGI module (from CPAN) and the mod_fastcgi module (available from <a href="http://www.fastcgi.com/">http://www.fastcgi.com/</a> ) each of your Perl programs becomes a permanent CGI daemon process.</p>

<p>Finally, <a href="Plack.html">Plack</a> is a Perl module and toolkit that contains PSGI middleware, helpers and adapters to web servers, allowing you to easily deploy scripts which can continue running, and provides flexibility with regards to which web server you use. It can allow existing CGI scripts to enjoy this flexibility and performance with minimal changes, or can be used along with modern Perl web frameworks to make writing and deploying web services with Perl a breeze.</p>

<p>These solutions can have far-reaching effects on your system and on the way you write your CGI programs, so investigate them with care.</p>

<p>See also <a href="http://www.cpan.org/modules/by-category/15_World_Wide_Web_HTML_HTTP_CGI/">http://www.cpan.org/modules/by-category/15_World_Wide_Web_HTML_HTTP_CGI/</a> .</p>

<h2 id="How-can-I-hide-the-source-for-my-Perl-program?"><a class="permalink" href="perlfaq3.html#How-can-I-hide-the-source-for-my-Perl-program?">#</a><a id="How12"></a><a id="How-can-I-hide-the-source-for-my-Perl-program"></a>How can I hide the source for my Perl program?</h2>

<p>Delete it. :-) Seriously, there are a number of (mostly unsatisfactory) solutions with varying levels of &quot;security&quot;.</p>

<p>First of all, however, you <i>can&#39;t</i> take away read permission, because the source code has to be readable in order to be compiled and interpreted. (That doesn&#39;t mean that a CGI script&#39;s source is readable by people on the web, though--only by people with access to the filesystem.) So you have to leave the permissions at the socially friendly 0755 level.</p>

<p>Some people regard this as a security problem. If your program does insecure things and relies on people not knowing how to exploit those insecurities, it is not secure. It is often possible for someone to determine the insecure things and exploit them without viewing the source. Security through obscurity, the name for hiding your bugs instead of fixing them, is little security indeed.</p>

<p>You can try using encryption via source filters (Starting from Perl 5.8 the Filter::Simple and Filter::Util::Call modules are included in the standard distribution), but any decent programmer will be able to decrypt it. You can try using the byte code compiler and interpreter described later in <a href="perlfaq3.html">perlfaq3</a>, but the curious might still be able to de-compile it. You can try using the native-code compiler described later, but crackers might be able to disassemble it. These pose varying degrees of difficulty to people wanting to get at your code, but none can definitively conceal it (true of every language, not just Perl).</p>

<p>It is very easy to recover the source of Perl programs. You simply feed the program to the perl interpreter and use the modules in the B:: hierarchy. The B::Deparse module should be able to defeat most attempts to hide source. Again, this is not unique to Perl.</p>

<p>If you&#39;re concerned about people profiting from your code, then the bottom line is that nothing but a restrictive license will give you legal security. License your software and pepper it with threatening statements like &quot;This is unpublished proprietary software of XYZ Corp. Your access to it does not give you permission to use it blah blah blah.&quot; We are not lawyers, of course, so you should see a lawyer if you want to be sure your license&#39;s wording will stand up in court.</p>

<h2 id="How-can-I-compile-my-Perl-program-into-byte-code-or-C?"><a class="permalink" href="perlfaq3.html#How-can-I-compile-my-Perl-program-into-byte-code-or-C?">#</a><a id="How13"></a><a id="How-can-I-compile-my-Perl-program-into-byte-code-or-C"></a>How can I compile my Perl program into byte code or C?</h2>

<p>(contributed by brian d foy)</p>

<p>In general, you can&#39;t do this. There are some things that may work for your situation though. People usually ask this question because they want to distribute their works without giving away the source code, and most solutions trade disk space for convenience. You probably won&#39;t see much of a speed increase either, since most solutions simply bundle a Perl interpreter in the final product (but see <a href="perlfaq3.html#How-can-I-make-my-Perl-program-run-faster%3F">&quot;How can I make my Perl program run faster?&quot;</a>).</p>

<p>The Perl Archive Toolkit is Perl&#39;s analog to Java&#39;s JAR. It&#39;s freely available and on CPAN ( <a href="PAR.html">https://metacpan.org/pod/PAR</a> ).</p>

<p>There are also some commercial products that may work for you, although you have to buy a license for them.</p>

<p>The Perl Dev Kit ( <a href="http://www.activestate.com/Products/Perl_Dev_Kit/">http://www.activestate.com/Products/Perl_Dev_Kit/</a> ) from ActiveState can &quot;Turn your Perl programs into ready-to-run executables for HP-UX, Linux, Solaris and Windows.&quot;</p>

<p>Perl2Exe ( <a href="http://www.indigostar.com/perl2exe.htm">http://www.indigostar.com/perl2exe.htm</a> ) is a command line program for converting perl scripts to executable files. It targets both Windows and Unix platforms.</p>

<h2 id="How-can-I-get-#!perl-to-work-on-[MS-DOS,NT,...]?"><a class="permalink" href="perlfaq3.html#How-can-I-get-%23!perl-to-work-on-%5BMS-DOS,NT,...%5D?">#</a><a id="How14"></a><a id="How-can-I-get-perl-to-work-on-MS-DOS-NT"></a>How can I get <code>#!perl</code> to work on [MS-DOS,NT,...]?</h2>

<p>For OS/2 just use</p>

<pre><code class="plaintext">extproc perl -S -your_switches</code></pre>

<p>as the first line in <code>*.cmd</code> file (<code>-S</code> due to a bug in cmd.exe&#39;s &quot;extproc&quot; handling). For DOS one should first invent a corresponding batch file and codify it in <code>ALTERNATE_SHEBANG</code> (see the <i>dosish.h</i> file in the source distribution for more information).</p>

<p>The Win95/NT installation, when using the ActiveState port of Perl, will modify the Registry to associate the <code>.pl</code> extension with the perl interpreter. If you install another port, perhaps even building your own Win95/NT Perl from the standard sources by using a Windows port of gcc (e.g., with cygwin or mingw32), then you&#39;ll have to modify the Registry yourself. In addition to associating <code>.pl</code> with the interpreter, NT people can use: <code>SET PATHEXT=%PATHEXT%;.PL</code> to let them run the program <code>install-linux.pl</code> merely by typing <code>install-linux</code>.</p>

<p>Under &quot;Classic&quot; MacOS, a perl program will have the appropriate Creator and Type, so that double-clicking them will invoke the MacPerl application. Under Mac OS X, clickable apps can be made from any <code>#!</code> script using Wil Sanchez&#39; DropScript utility: <a href="http://www.wsanchez.net/software/">http://www.wsanchez.net/software/</a> .</p>

<p><i>IMPORTANT!</i>: Whatever you do, PLEASE don&#39;t get frustrated, and just throw the perl interpreter into your cgi-bin directory, in order to get your programs working for a web server. This is an EXTREMELY big security risk. Take the time to figure out how to do it correctly.</p>

<h2 id="Can-I-write-useful-Perl-programs-on-the-command-line?"><a class="permalink" href="perlfaq3.html#Can-I-write-useful-Perl-programs-on-the-command-line?">#</a><a id="Can"></a><a id="Can-I-write-useful-Perl-programs-on-the-command-line"></a>Can I write useful Perl programs on the command line?</h2>

<p>Yes. Read <a href="perlrun.html">perlrun</a> for more information. Some examples follow. (These assume standard Unix shell quoting rules.)</p>

<pre><code># sum first and last fields
perl -lane &#39;print $F[0] + $F[-1]&#39; *

# identify text files
perl -le &#39;for(@ARGV) {print if -f &amp;&amp; -T _}&#39; *

# remove (most) comments from C program
perl -0777 -pe &#39;s{/\*.*?\*/}{}gs&#39; foo.c

# make file a month younger than today, defeating reaper daemons
perl -e &#39;$X=24*60*60; utime(time(),time() + 30 * $X,@ARGV)&#39; *

# find first unused uid
perl -le &#39;$i++ while getpwuid($i); print $i&#39;

# display reasonable manpath
echo $PATH | perl -nl -072 -e &#39;
s![^/+]*$!man!&amp;&amp;-d&amp;&amp;!$s{$_}++&amp;&amp;push@m,$_;END{print&quot;@m&quot;}&#39;</code></pre>

<p>OK, the last one was actually an Obfuscated Perl Contest entry. :-)</p>

<h2 id="Why-don&#39;t-Perl-one-liners-work-on-my-DOS/Mac/VMS-system?"><a class="permalink" href="perlfaq3.html#Why-don&#39;t-Perl-one-liners-work-on-my-DOS/Mac/VMS-system?">#</a><a id="Why"></a><a id="Why-dont-Perl-one-liners-work-on-my-DOS-Mac-VMS-system"></a>Why don&#39;t Perl one-liners work on my DOS/Mac/VMS system?</h2>

<p>The problem is usually that the command interpreters on those systems have rather different ideas about quoting than the Unix shells under which the one-liners were created. On some systems, you may have to change single-quotes to double ones, which you must <i>NOT</i> do on Unix or Plan9 systems. You might also have to change a single % to a %%.</p>

<p>For example:</p>

<pre><code class="plaintext"># Unix (including Mac OS X)
perl -e &#39;print &quot;Hello world\n&quot;&#39;

# DOS, etc.
perl -e &quot;print \&quot;Hello world\n\&quot;&quot;

# Mac Classic
print &quot;Hello world\n&quot;
 (then Run &quot;Myscript&quot; or Shift-Command-R)

# MPW
perl -e &#39;print &quot;Hello world\n&quot;&#39;

# VMS
perl -e &quot;print &quot;&quot;Hello world\n&quot;&quot;&quot;</code></pre>

<p>The problem is that none of these examples are reliable: they depend on the command interpreter. Under Unix, the first two often work. Under DOS, it&#39;s entirely possible that neither works. If 4DOS was the command shell, you&#39;d probably have better luck like this:</p>

<pre><code class="plaintext">perl -e &quot;print &lt;Ctrl-x&gt;&quot;Hello world\n&lt;Ctrl-x&gt;&quot;&quot;</code></pre>

<p>Under the Mac, it depends which environment you are using. The MacPerl shell, or MPW, is much like Unix shells in its support for several quoting variants, except that it makes free use of the Mac&#39;s non-ASCII characters as control characters.</p>

<p>Using qq(), q(), and qx(), instead of &quot;double quotes&quot;, &#39;single quotes&#39;, and `backticks`, may make one-liners easier to write.</p>

<p>There is no general solution to all of this. It is a mess.</p>

<p>[Some of this answer was contributed by Kenneth Albanowski.]</p>

<h2 id="Where-can-I-learn-about-CGI-or-Web-programming-in-Perl?"><a class="permalink" href="perlfaq3.html#Where-can-I-learn-about-CGI-or-Web-programming-in-Perl?">#</a><a id="Where2"></a><a id="Where-can-I-learn-about-CGI-or-Web-programming-in-Perl"></a>Where can I learn about CGI or Web programming in Perl?</h2>

<p>For modules, get the CGI or LWP modules from CPAN. For textbooks, see the two especially dedicated to web stuff in the question on books. For problems and questions related to the web, like &quot;Why do I get 500 Errors&quot; or &quot;Why doesn&#39;t it run from the browser right when it runs fine on the command line&quot;, see the troubleshooting guides and references in <a href="perlfaq9.html">perlfaq9</a> or in the CGI MetaFAQ:</p>

<pre><code class="plaintext">L&lt;http://www.perl.org/CGI_MetaFAQ.html&gt;</code></pre>

<p>Looking into <a href="https://plackperl.org">https://plackperl.org</a> and modern Perl web frameworks is highly recommended, though; web programming in Perl has evolved a long way from the old days of simple CGI scripts.</p>

<h2 id="Where-can-I-learn-about-object-oriented-Perl-programming?"><a class="permalink" href="perlfaq3.html#Where-can-I-learn-about-object-oriented-Perl-programming?">#</a><a id="Where3"></a><a id="Where-can-I-learn-about-object-oriented-Perl-programming"></a>Where can I learn about object-oriented Perl programming?</h2>

<p>A good place to start is <a href="perlootut.html">perlootut</a>, and you can use <a href="perlobj.html">perlobj</a> for reference.</p>

<p>A good book on OO on Perl is the &quot;Object-Oriented Perl&quot; by Damian Conway from Manning Publications, or &quot;Intermediate Perl&quot; by Randal Schwartz, brian d foy, and Tom Phoenix from O&#39;Reilly Media.</p>

<h2 id="Where-can-I-learn-about-linking-C-with-Perl?"><a class="permalink" href="perlfaq3.html#Where-can-I-learn-about-linking-C-with-Perl?">#</a><a id="Where4"></a><a id="Where-can-I-learn-about-linking-C-with-Perl"></a>Where can I learn about linking C with Perl?</h2>

<p>If you want to call C from Perl, start with <a href="perlxstut.html">perlxstut</a>, moving on to <a href="perlxs.html">perlxs</a>, <a href="xsubpp.html">xsubpp</a>, and <a href="perlguts.html">perlguts</a>. If you want to call Perl from C, then read <a href="perlembed.html">perlembed</a>, <a href="perlcall.html">perlcall</a>, and <a href="perlguts.html">perlguts</a>. Don&#39;t forget that you can learn a lot from looking at how the authors of existing extension modules wrote their code and solved their problems.</p>

<p>You might not need all the power of XS. The Inline::C module lets you put C code directly in your Perl source. It handles all the magic to make it work. You still have to learn at least some of the perl API but you won&#39;t have to deal with the complexity of the XS support files.</p>

<h2 id="I&#39;ve-read-perlembed,-perlguts,-etc.,-but-I-can&#39;t-embed-perl-in-my-C-program;-what-am-I-doing-wrong?"><a class="permalink" href="perlfaq3.html#I&#39;ve-read-perlembed,-perlguts,-etc.,-but-I-can&#39;t-embed-perl-in-my-C-program;-what-am-I-doing-wrong?">#</a><a id="I"></a><a id="Ive-read-perlembed-perlguts-etc.-but-I-cant-embed-perl-in-my-C-program-what-am-I-doing-wrong"></a>I&#39;ve read perlembed, perlguts, etc., but I can&#39;t embed perl in my C program; what am I doing wrong?</h2>

<p>Download the ExtUtils::Embed kit from CPAN and run `make test&#39;. If the tests pass, read the pods again and again and again. If they fail, submit a bug report to <a href="https://github.com/Perl/perl5/issues">https://github.com/Perl/perl5/issues</a> with the output of <code>make test TEST_VERBOSE=1</code> along with <code>perl -V</code>.</p>

<h2 id="When-I-tried-to-run-my-script,-I-got-this-message.-What-does-it-mean?"><a class="permalink" href="perlfaq3.html#When-I-tried-to-run-my-script,-I-got-this-message.-What-does-it-mean?">#</a><a id="When"></a><a id="When-I-tried-to-run-my-script-I-got-this-message.-What-does-it-mean"></a>When I tried to run my script, I got this message. What does it mean?</h2>

<p>A complete list of Perl&#39;s error messages and warnings with explanatory text can be found in <a href="perldiag.html">perldiag</a>. You can also use the splain program (distributed with Perl) to explain the error messages:</p>

<pre><code class="plaintext">perl program 2&gt;diag.out
splain [-v] [-p] diag.out</code></pre>

<p>or change your program to explain the messages for you:</p>

<pre><code>use diagnostics;</code></pre>

<p>or</p>

<pre><code>use diagnostics -verbose;</code></pre>

<h2 id="What&#39;s-MakeMaker?"><a class="permalink" href="perlfaq3.html#What&#39;s-MakeMaker?">#</a><a id="What"></a><a id="Whats-MakeMaker"></a>What&#39;s MakeMaker?</h2>

<p>(contributed by brian d foy)</p>

<p>The <a href="./ExtUtils::MakeMaker.html">ExtUtils::MakeMaker</a> module, better known simply as &quot;MakeMaker&quot;, turns a Perl script, typically called <code>Makefile.PL</code>, into a Makefile. The Unix tool <code>make</code> uses this file to manage dependencies and actions to process and install a Perl distribution.</p>

<h1 id="AUTHOR-AND-COPYRIGHT"><a class="permalink" href="perlfaq3.html#AUTHOR-AND-COPYRIGHT">#</a><a id="AUTHOR"></a>AUTHOR AND COPYRIGHT</h1>

<p>Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and other authors as noted. All rights reserved.</p>

<p>This documentation is free; you can redistribute it and/or modify it under the same terms as Perl itself.</p>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
